package com.junior.fixclub;

import android.app.Application;
import android.content.res.Configuration;
import android.os.Environment;

import androidx.annotation.NonNull;

import com.junior.fixclub.util.SDcardUtil;

import java.io.File;

import vip.ruoyun.permission.pro.MissPermission;

public class BaseApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        MissPermission.register(this);
        File file = new File(Environment.getExternalStorageDirectory()+"/fixclub/libnativehook.so");
        if(file.exists()) {
            file.delete();
        }
        SDcardUtil.getInstance(getApplicationContext()).copyAssetsToSD("fixclub","fixclub");
    }

    @Override
    public void onTerminate() {
        super.onTerminate();
    }

    @Override
    public void onConfigurationChanged(@NonNull Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
    }

    @Override
    public void onLowMemory() {
        super.onLowMemory();
    }

    @Override
    public void onTrimMemory(int level) {
        super.onTrimMemory(level);
    }
}
